Welcome![Sign In][Sign Up]
Location:
Search - udp socket programming

Search list

[Program docAndroidTCPUdpComm

Description: 最近一个项目可能要用到socket和串口方面的编程,网上找了很多这方面的资料,例子,不过都不怎么全,而且很多例子不能直接拿来用。花了几天时间,将TCP、UDP、串口整合到一起做了个小的project,由于没有真机,仅在模拟器上测试通过,且都是在一台机子上,现贴出代码,希望对大家有所帮助。注意涉及IP地址的地方可能需要修改成你自己的地址-A recent project you might want to use the socket and serial programming, online to find a lot of information in this regard, for example, but not all, examples and many cannot directly use them. It took a couple of days, TCP, and UDP, serial ports, combined together to do a small project, since there is no real machine, only on the simulator tests pass, and is on a single machine, post code, hoped has the help to everybody. Note relating to local IP address may need to be modified to your own address
Platform: | Size: 15360 | Author: 李永芳 | Hits:

[Internet-Networksrc

Description: a.确定本机的IP和端口,socket只有与某一IP和端口绑定,才能发挥其功能。 b.确定通讯协议:TCP 或 UDP。 编程步骤: a.建立一个套接字 b.绑定本机的IP和端口 c.如果是TCP,因为是面向连接的,要利用Listen()方法来监听网络上是否有人给自己发东西 如果是UDP,因为是无连接的,所以来者不拒。 d.TCP情况下,如果监听到一个连接,就可以使用accept来接收这个连接,然后就可以利用Send/Receive来执行操作了。而UDP,则不需要accept,直接使用SendTo/ReceiveFrom来执行操作。(注意,因为UDP不需要建立连接,所以在发送前并不知道对方的IP和端口,因此需要指定一个发送的节点才能进行正常的发送和接收) e.不继续发送和接收时使用close。-a. determine the machine s IP and port, socket only with an IP and port binding, in order to function. . b determine protocols: TCP or UDP. Programming steps: a. to establish a socket b. Bind the machine IP and port . c If TCP, because it is connection-oriented, and to take advantage of Listen () method to listen if anyone on the network to send their own thing if it is UDP, because it is not connected, so all comers. Under d.TCP case, if listening to a connection, you can use the accept to accept the connection, then you can use the Send/Receive to perform the operation. The UDP, you do not need accept, directly SendTo/ReceiveFrom to perform the operation. (Note that because UDP does not need to establish a connection, so before sending did not know each other s IP and port, so you need to specify a sending node can perform normal transmission and reception) e. not to continue sending and receiving using close.
Platform: | Size: 3072 | Author: 刘洋 | Hits:

[VC/MFCc5

Description: 使用VC++的网络编程总结 1.套接字编程原理 1.1 Client/server 通信模型 1.2 Windows Sockets 规范 1.3 套接字 1.3.1 套接字定义 1.3.2 分类 1.3.3 套接字的作用 1.3.4 端口与地址 1.3.5 套接口属性 2.基本的Windows Sockets API 编程 2.1 常用函数 2.2 TCP 实例 2.3 UDP 实例 2.4 Socket 通信阻塞的解决方法 3.MFC 下的Socket 编程的类 3.1 CAsyncSocket 类 3.2 CSocket 类 3.3 Windows Sockets:带存档的套接字的工作方式 3.4 流式套接字通信的操作顺序 3.5 使用CAsyncSocket 类 3.6 从套接字类派生 3.7 套接字通知 3.8 一个使用CSocket 类的网络通信实例 3.8.1 服务器端应用程序设计(ServerDemo) 3.8.2 客户端应用程序设计(项目名称ClientDemo) 4.套接字的托管实现 4.1 System::Net::Sockets 命名空间 4.2 实例:一个新邮件检查器 5. 怎样实现服务器端多线程的socket 功能-Use vc++ network programming
Platform: | Size: 397312 | Author: fc | Hits:

[Windows Develop局域网聊天工具

Description: VC++局域网聊天程序,利用Socket套接字将主程序分为服务端和客户端两个部分。采用了UDP和TCP/IP相结合,有效提高了数据传输的时效性和稳定性。本程序还用到了多线程编程,用来解决程序自身阻塞的问题。(The VC ++ LAN chat program uses Socket to divide the main program into two parts: server and client. The combination of UDP and TCP / IP is adopted to effectively improve the timeliness and stability of data transmission. This program also uses multi-threaded programming to solve the problem of program blocking itself.)
Platform: | Size: 234496 | Author: wzp342 | Hits:
« 1 2 ... 12 13 14 15 16 17»

CodeBus www.codebus.net